﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Department/Master.Master" AutoEventWireup="true" CodeBehind="ViewHistory.aspx.cs" Inherits="logicunivesityinventorystore.Department.ViewHistory" %>
<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="asp" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
      <script type="text/javascript">
          function setEnd(sender, args) {
              var myDate = sender._selectedDate;
              var myCal = $find("cal2");
              myCal.set_startDate(myDate);
          }
    </script>
    </asp:Content>


<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder2" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
    <ContentTemplate>
    <h1>View History</h1>
     <asp:Label ID="lblFrom" runat="server" Text="From:"></asp:Label>
        <asp:TextBox ID="txtFrom" runat="server" 
            ontextchanged="TextBox1_TextChanged" ViewStateMode="Enabled" >--Select Date--</asp:TextBox>
        <asp:CalendarExtender ID="cal1" runat="server" 
            Enabled="True" TargetControlID="txtFrom"  Format="dd/MM/yyyy" 
            OnClientDateSelectionChanged="setEnd">
        </asp:CalendarExtender>
        <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
            ErrorMessage="*" ForeColor="Red" ControlToValidate="txtFrom"></asp:RequiredFieldValidator>
        &nbsp;&nbsp;<asp:Label ID="lblTo" runat="server" Text="To:"></asp:Label>
        <asp:TextBox ID="txtTo" runat="server" ontextchanged="TextBox2_TextChanged">--Select Date--</asp:TextBox>
        <asp:CalendarExtender ID="cal2" runat="server" 
            Enabled="True" TargetControlID="txtTo" Format="dd/MM/yyyy" 
            BehaviorID="cal2" >
        </asp:CalendarExtender>
        &nbsp;
        <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" 
            ErrorMessage="*" ForeColor="Red" ControlToValidate="txtTo"></asp:RequiredFieldValidator>
        &nbsp;<asp:Label ID="lblStatus" runat="server" Text="Status:"></asp:Label>
        <asp:DropDownList ID="ddlStatus" runat="server">
            <asp:ListItem>Approved</asp:ListItem>
            <asp:ListItem>Rejected</asp:ListItem>
        </asp:DropDownList>
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<asp:Button ID="btnView" runat="server" Text="View" 
            onclick="Button1_Click" CssClass="ButtonStyle" Height="24px" 
            Width="43px" />
        &nbsp;&nbsp;
        <br />
        <br />
        <asp:Label ID="lblHistory" runat="server" Text="Your History:"></asp:Label>
        &nbsp;<asp:Label
            ID="lblFromDate" runat="server"></asp:Label>
        <asp:Label ID="lbDuration" runat="server" Text="--"></asp:Label>
        <asp:Label ID="lblToDate" runat="server"></asp:Label>
        &nbsp;<br />
       
        <asp:GridView ID="gvHistory" runat="server" AutoGenerateColumns="False" 
            onrowcommand="GridView1_RowCommand" CssClass="gridview">
            <Columns>
                <asp:TemplateField HeaderText="Requisition Form No.">
                    <ItemTemplate>
                        <asp:LinkButton ID="LinkButton1" runat="server" CommandName="Select" CommandArgument= '<%# Eval("FormID") %>'
                            Text='<%# Eval("FormID") %>'></asp:LinkButton> 
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:BoundField DataField="ApprovedDate" HeaderText="Date" />
            </Columns>
        </asp:GridView>
        
        <br />
        <asp:Label ID="lbDetails" runat="server" Text="Order Details:"></asp:Label>
        <br />
        <asp:GridView ID="gvDetails" runat="server">
        </asp:GridView>
    </ContentTemplate>
    </asp:UpdatePanel>
    
</asp:Content>


    <asp:Content ID="Content3" runat="server" 
    contentplaceholderid="ContentPlaceHolder3">
            
                </asp:Content>
<asp:Content ID="Content4" runat="server" 
    contentplaceholderid="ContentPlaceHolder5">
          
                </asp:Content>



    